package com.y.fund.domain.mem;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.y.fund.aacore.abs.IdObj;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.Column;
import jakarta.persistence.MappedSuperclass;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@MappedSuperclass
/** 用户信息摘要 */
public class MB13UserAbs extends IdObj{

	protected static final long serialVersionUID = -8215851889216039393L;

	@NotBlank(message = "用户名称不能为空")
	@Column(name="u_name", length=128)
	@Schema(title = "用户名称")
	protected String name;

	@Schema(title = "用户编号")
	@Column(name="u_code", length=32)
	protected String code;

	@Column(name="lgn_name", length=32, nullable=false, unique=true, updatable=false)
	@Schema(title = "登录账号名")
	protected String lgnName;

	@JsonIgnore
	@Schema(title = "登录密码", hidden = true)
	@Column(name="lgn_pwd", updatable =false, length=64)
	protected String lgnPwd;

	@Schema(title = "最新修改密码时间【毫秒】")
	@Column(name="chg_pwd_time", length=14)
	protected Long changePwdTime;

	@Size(max = 16)
	@Column(name="u_mobile", length=16)
	@Schema(title = "联系电话")
	protected String mobile;

	@Schema(title = "是否内置，内置用户不可 禁用、删除。")
	@Column(name="is_builtin", updatable=false)
	protected Integer builtin;

	@Schema(title = "是否可用：1：可用；0：不可用")
	@Column(name="u_enabled")
	protected Integer enabled;
}
